<?php
class TypeModel extends Action{
	//test
	//
	//############test
	public function getmobytypenm($typenm){
		$info=collectinfo(__METHOD__,'$typenm',array($typenm));
		if(isset($typenm)===false){return createarrerr('error_code','typenm 不能为空',$info);}//防止NULL
		
		$type=M('type');
		$mo=$type->where("typenm='".$typenm."'")->find();

		return createarrok('ok',$mo,'',$info);
	}

	//公版
	public function getmlsorderbymoneydesc(){
		$info=collectinfo(__METHOD__,'',array());
		$type=M('type');
		$mls=$type->order('typemoney DESC')->select();
		return createarrok('ok',$mls,'',$info);
	}

} 
?>